print("Starting sample application");
print("You can open the application using url : http://localhost:8013");
app.map('/request_echo_submit',function(req,res){
                var h = req.headers();
                res.contentType('text/html');
                
                res.send("<html><head>");
                res.send('<style>@import "http://fonts.googleapis.com/css?family=Lato:300,400,700";'+
            'body{ font-family:"Lato",Arial; }</style>');
    res.send("</head>")
                res.send("<body>")
                res.send('<a href="/" >Home</a><br><br>')
                
                res.send('HTTP Method : '+req.method()+'<br>')
                res.send('Request URI : '+req.uri()+'<br>')
                res.send("<h2>Header</h2><ol>")
                
                for(item in h){
                    res.send("<li>"+h[item]+' : '+req.header(h[item])+'</li>');
                }
                res.send("</ol>")
                var d = req.params();
                res.send("<h2>Params</h2><ol>")
                for(item in d){
                    res.send("<li>"+d[item]+' : '+req.param(d[item])+'</li>');
                }
                res.send("</ol>")
                var f = req.files();
                res.send("<h2>Files</h2><ol>")
                for(item in f){
                    res.send("<li>"+f[item]+' : '+req.file(f[item])+'</li>');
                }
                res.send("</ol>")
                res.send("</body></html>")
        });

        app.map('/log_test.txt',function(req,res){
                app.log('This is your message')
                app.log(req.param('message'))
                res.sendFile('/../log/app.log')
          });
        
    
        app.map("/set",function(req,res){
                app.put(req.param("name"),req.param("value"));
                res.send("ok") ;
            });
            
        app.map("/get",function(req,res){
                res.send(app.get(req.param("name"))) ;
        });

app.listen();